Skip to content

test(wtr): remove unnecessary support for .only files @W-19098252#5513

Merged
wjhsf merged 84 commits intomasterfrom
wjh/no-.only
Sep 25, 2025
Merged

test(wtr): remove unnecessary support for .only files @W-19098252#5513
wjhsf merged 84 commits intomasterfrom
wjh/no-.only

Conversation

@wjhsf
Copy link
Contributor

@wjhsf wjhsf commented Sep 24, 2025

The .only file hack was originally implemented for tests because there was no alternative way to focus on a single test.

Web Test Runner allows you to specify a single file to execute (e.g .yarn test:hydration test-hydration/some/test/index.spec.js), so this workaround is not necessary.

Details

Does this pull request introduce a breaking change?

  • 😮‍💨 No, it does not introduce a breaking change.
  • 💔 Yes, it does introduce a breaking change.

Does this pull request introduce an observable change?

  • 🤞 No, it does not introduce an observable change.
  • 🔬 Yes, it does include an observable change.

GUS work item

wjhsf and others added 30 commits September 2, 2025 18:01
There's no setup/teardown needed, it's a single test, and WTR provides per-file encapsulation
working toward just importing and executing things, but not quite there yet
two env vars for the same goal is unnecessary
I think the last one was a concurrency related timeout,
which was previously addressed.
helper files shouldn't have side effects; all setup should be in the setup file
all tests are run in isolation
@wjhsf wjhsf requested a review from a team as a code owner September 24, 2025 20:39
Base automatically changed from wjh/no-spy-console to master September 25, 2025 15:34
@wjhsf wjhsf merged commit e6efc34 into master Sep 25, 2025
7 checks passed
@wjhsf wjhsf deleted the wjh/no-.only branch September 25, 2025 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants